package com.km.team.phsystem;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.lang.management.ManagementFactory;

/**
 * Author: jiangjun
 * Date: 2018/10/15
 * Time: 上午9:18
 * Description:
 */
@SpringBootApplication
@EnableScheduling
public class Application implements CommandLineRunner {

    private static final Logger logger = LoggerFactory.getLogger(Application.class);

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @Override
    public void run(String... strings) throws Exception {
        String name = ManagementFactory.getRuntimeMXBean().getName();
        // get pid
        logger.info("Runing......current JVM " + name);
    }
}
